DVIPS=dvips -t a4 
LATEX=latex -file-line-error -halt-on-error
PDFLATEX=pdflatex -file-line-error -halt-on-error
PDFS=cuqu.pdf

all: $(PDFS)

.PHONY: plots

plots:
	$(MAKE) -C barrier_mark
	$(MAKE) -C queue_mark

%.pdf: %.tex plots
	$(PDFLATEX) $^

%.dvi: %.tex plots
	$(LATEX) $^

%.ps: %.dvi
	$(DVIPS) -o $@ $^

clean:
	rm -f *.aux *.log *.dvi *.toc *.err $(PDFS)
